package com.domain.factory;

import com.domain.DO.FlightClass;
import com.domain.DTO.FlightClassDto;
import com.domain.VO.FlightClassVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author 大忽悠
 * @create 2022/11/11 11:45
 */
public class FlightClassFactory {
    public static final FlightClassConvert FLIGHT_CLASS_CONVERT= Mappers.getMapper(FlightClassConvert.class);

    @Mapper
    public interface FlightClassConvert{
        @Mapping(target = "id",ignore = true)
        FlightClass toFlightClass(FlightClassVO flightClassVO);
        List<FlightClassDto> toFlightClassDto(List<FlightClass> flightClass);
    }
}
